<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <%@page isELIgnored="false" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>薪酬详情</title>
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link id="bootstrap-style" href="<c:url value="/css/bootstrap.min.css"/>" rel="stylesheet">
	<link href="<c:url value="/css/bootstrap-responsive.min.css"/>" rel="stylesheet">
	<link id="base-style" href="<c:url value="/css/style.css"/>" rel="stylesheet">
	<link id="base-style-responsive" href="<c:url value="/css/style-responsive.css"/>" rel="stylesheet">
	<link href="<c:url value="/css/index.css"/>" rel="stylesheet">
	<link rel="shortcut icon" href="<c:url value="/img/favicon.ico"/>">
	<link href="<c:url value="/css/page.css"/>" rel="stylesheet">
	<link rel="stylesheet" type="text/css" href="<c:url value="/css/jquery.datetimepicker.css"/>"/>
	<script src="<c:url value="/js/jquery-1.9.1.min.js"/>"></script>
	<script src="<c:url value="/js/jquery-migrate-1.0.0.min.js"/>"></script>
	<script type="text/javascript" src="<c:url value="/js/layer/layer.js"/>"></script>
	<script src="<c:url value="/js/laydate/laydate.js"/>"></script>
	<script src="<c:url value="/js/build/jquery.datetimepicker.full.js"/>"></script>
</head>
 <script type="text/javascript">
 
 $(function(){ 
	 var msg="${msg}";
	 if(msg!=null&&msg!=""){
		 alert(msg);
	 }
 }); 
 
 $(document).ready(function(){
	  $("#hide").click(function(){
	  	$("#latedeductions").hide();
	  	$("#hide").hide();
	  	$("#show").show();
	  });
	  $("#show").click(function(){
	  	$("#latedeductions").show();
	  	$("#show").hide();
	  	$("#hide").show();
	  });
	  $("#hide2").click(function(){
	  	$("#latedeductions2").hide();
	  	$("#hide2").hide();
	  	$("#show2").show();
	  });
	  $("#show2").click(function(){
	  	$("#latedeductions2").show();
	  	$("#show2").hide();
	  	$("#hide2").show();
	  });
	  $("#hide3").click(function(){
	  	$("#latedeductions3").hide();
	  	$("#hide3").hide();
	  	$("#show3").show();
	  });
	  $("#show3").click(function(){
	  	$("#latedeductions3").show();
	  	$("#show3").hide();
	  	$("#hide3").show();
	  });
	  $("#hide4").click(function(){
	  	$("#latedeductions4").hide();
	  	$("#hide4").hide();
	  	$("#show4").show();
	  });
	  $("#show4").click(function(){
	  	$("#latedeductions4").show();
	  	$("#show4").hide();
	  	$("#hide4").show();
	  });
	});
 
 
 
 function closebutton() {
	var index = parent.layer.getFrameIndex(window.name);  
 	parent.layer.close(index);  
 }
 

 </script>
<body>
<jsp:useBean id="myDate" class="java.util.Date"/>
	<form name="frm" id="frm" method="post" action="<%=basePath%>salaryc/insertUserPay">
			<input type="hidden" id="userid" name="userid"  value="${user.id }">
			<input type="hidden" id="payid" name="payid"  value="${pay.user.id }">
			<div id="content" class="span10" style="width: 100%;">
				<div class="row-fluid content-table">
					<span>用户信息</span>
					<table id="tab" class="table table-striped table-bordered bootstrap-datatable">
					  <tbody>
						<tr>
							<td style="text-align:right;width: 20%">姓名：</td>
							<td  style="text-align:left;width: 30%">
								${pay.user.name }
							</td>
							<td style="text-align:right;width: 20%">工号：</td>
							<td  style="text-align:left;width: 30%">
								${pay.user.jobnumber }
							</td>
						</tr>
						<tr>
							<td style="text-align:right;width: 20%">时间：</td>
							<td colspan="3"  style="text-align:left;">
								${pay.year }-${pay.month }
							</td>
						</tr>
					  </tbody>
				  </table>  
				  <span>基础薪资</span>
				  <table id="tab" class="table table-striped table-bordered bootstrap-datatable">
					  <tbody>
						<tr>
							<td style="text-align:right;width: 20%">薪资总额：</td>
							<td colspan="3" style="text-align:left;width: 30%">
								${pay.totalpayroll }
							</td>
						</tr>
						<tr>
							<td style="text-align:right;width: 20%">实际薪资：</td>
							<td  style="text-align:left;width: 30%">
								${pay.realsalary }
							</td>
							<td style="text-align:right;width: 20%">实际底薪：</td>
							<td  style="text-align:left;width: 30%">
								${pay.actualbasesalary }
							</td>
						</tr>
						<tr>
							<td style="text-align:right;width: 20%">公积金：</td>
							<td  style="text-align:left;width: 30%">
								${pay.accumulationFund }
							</td>
							<td style="text-align:right;width: 20%">社保：</td>
							<td  style="text-align:left;width: 30%">
								${pay.socialSecurity }
							</td>
						</tr>
						<tr>
							<td style="text-align:right;width: 20%">应税薪资：</td>
							<td  style="text-align:left;width: 30%">
								${pay.taxableSalary }
							</td>
							<td style="text-align:right;width: 20%">个人交税：</td>
							<td  style="text-align:left;width: 30%">
								${pay.personalIncomeTax }
							</td>
						</tr>
					  </tbody>
				  </table>          
				  <span>扣款详情</span>
				  <table id="tab" class="table table-striped table-bordered bootstrap-datatable">
					  <tbody>
						<tr>
							<td style="text-align:right;width: 20%">迟到次数：</td>
							<td  style="text-align:left;width: 30%">
								${pay.latenumber }
							</td>
							<td style="text-align:right;width: 20%">迟到分钟：</td>
							<td  style="text-align:left;width: 30%">
								${pay.latetime }
							</td>
						</tr>
						<tr>
							<td style="text-align:right;width: 20%">迟到扣款：</td>
							<td colspan="3"  style="text-align:left;">
								${pay.latedeductions } &nbsp;&nbsp;
								<img alt="" id="hide"  style="display:none;" src="<%=basePath%>img/youlingimg/delete.png">
								<img alt="" id="show"  src="<%=basePath%>img/youlingimg/add.png">
							</td>
						</tr>
					  </tbody>
				  </table>       
				  <table id="latedeductions" class="table table-striped table-bordered bootstrap-datatable" style="display:none;" >
					  <tbody>
						<tr>
							<td style="text-align:center;width: 20%">迟到分钟</td>
							<td style="text-align:center;width: 30%">迟到时间</td>
							<td  style="text-align:center;width: 30%">扣款范围</td>
							<td style="text-align:center;width: 30%">扣款金额</td>
						</tr>
					  <c:forEach items="${latebeanlist }" var="late">
						<tr>
							<td style="text-align:center; 20%">${late.latetime }</td>
							<td style="text-align:center;width: 30%">
								<c:set target="${myDate}" property="time" value="${late.time }"/> 
								<fmt:formatDate pattern="yyyy-MM-dd HH:mm" value="${myDate}" type="both"/> 
							</td>
							<td  style="text-align:center;width: 30%">
								${late.starminutes }分钟-${late.endminutes }分钟
							</td>
							<td style="text-align:center;width: 30%">${late.money }</td>
						</tr>
					  </c:forEach>
					  </tbody>
				  </table>  
				  <table id="tab" class="table table-striped table-bordered bootstrap-datatable">
					  <tbody>
						<tr>
							<td style="text-align:right;width: 15%">早退次数：</td>
							<td  style="text-align:left;width: 15%">
								${pay.earlynumber }
							</td>
							<td style="text-align:right;width: 15%">早退分钟：</td>
							<td  style="text-align:left;width: 15%">
								${pay.earlytime }
							</td>
							<td style="text-align:right;width: 18%">超出免扣：</td>
							<td style="text-align:left;width: 15%">
								${overtime }分钟
							</td>
						</tr>
						<tr>
							<td style="text-align:right;width: 20%">早退扣款：</td>
							<td colspan="3"  style="text-align:left;">
								${pay.earlydeductions } &nbsp;&nbsp;
								<img alt="" id="hide4"  style="display:none;" src="<%=basePath%>img/youlingimg/delete.png">
								<img alt="" id="show4"  src="<%=basePath%>img/youlingimg/add.png">
							</td>
						</tr>
					  </tbody>
				  </table>       
				  <table id="latedeductions4" class="table table-striped table-bordered bootstrap-datatable" style="display:none;" >
					  <tbody>
						<tr>
							<td style="text-align:center;width: 20%">早退分钟</td>
							<td style="text-align:center;width: 30%">早退时间</td>
							<td  style="text-align:center;width: 30%">扣款范围</td>
							<!-- <td style="text-align:center;width: 30%">扣款金额</td> -->
						</tr>
					  <c:forEach items="${earlybeanlist }" var="early">
						<tr>
							<td style="text-align:center; 20%">${early.earlyminute }</td>
							<td style="text-align:center;width: 30%">
								<c:set target="${myDate}" property="time" value="${early.earlytime }"/> 
								<fmt:formatDate pattern="yyyy-MM-dd HH:mm" value="${myDate}" type="both"/> 
							</td>
							<td  style="text-align:center;width: 30%">
								${early.starminutes }分钟-${early.endminutes }分钟 / ${early.money }
							</td>
							<%-- <c:if test="${a.status != 0}">
								<td style="text-align:center;width: 30%">${early.money }</td>
							</c:if> --%>
						</tr>
					  </c:forEach>
					  </tbody>
				  </table>
				  <span>出勤详情</span>
				  <table id="tab" class="table table-striped table-bordered bootstrap-datatable">
					  <tbody>
						<tr>
							<td style="text-align:right;width: 20%">出勤天数：</td>
							<td  style="text-align:left;width: 30%">
								${pay.ycqts }
							</td>
							<td style="text-align:right;width: 20%">缺勤天数：</td>
							<td  style="text-align:left;width: 30%">
								${pay.absenteeismdays }
							</td>
						</tr>
					  </tbody>
				  </table>        
				  <span>加班详情</span>
				  <table id="tab" class="table table-striped table-bordered bootstrap-datatable">
					  <tbody>
						<tr>
							<td style="text-align:right;width: 20%">加班次数：</td>
							<td  style="text-align:left;width: 30%">
								${pay.overtimenumber }
							</td>
							<td style="text-align:right;width: 20%">加班金额：</td>
							<td colspan="3"  style="text-align:left;">
								${pay.overtimemoney  } &nbsp;&nbsp;
								<img alt="" id="hide2"  style="display:none;" src="<%=basePath%>img/youlingimg/delete.png">
								<img alt="" id="show2"  src="<%=basePath%>img/youlingimg/add.png">
							</td>
						</tr>
					  </tbody>
				  </table>       
				  <table id="latedeductions2" class="table table-striped table-bordered bootstrap-datatable" style="display:none;" >
					  <tbody>
						<tr>
							<td style="text-align:center;width: 30%">加班时间</td>
							<td style="text-align:center;width: 20%">加班量</td>
							<td  style="text-align:center;width: 20%">加班量单位</td>
							<td style="text-align:center;width: 20%">加班金额</td>
						</tr>
					  <c:forEach items="${overtimebeanlist }" var="late">
						<tr>
							<td style="text-align:center;width: 30%">
								<c:set target="${myDate}" property="time" value="${late.time }"/> 
								<fmt:formatDate pattern="yyyy-MM-dd" value="${myDate}" type="both"/> 
							</td>
							<td style="text-align:center; 20%">${late.number }</td>
							<td  style="text-align:center;width: 20%">
								<c:if test="${late.unit == 1}">吨</c:if>	
								<c:if test="${late.unit == 2}">件</c:if>	
								<c:if test="${late.unit == 3}">时</c:if>
							</td>
							<td style="text-align:center;width: 20%">${late.money }</td>
						</tr>
					  </c:forEach>
					  </tbody>
				  </table>  
				  <span>补贴款项</span>
				  <table id="tab" class="table table-striped table-bordered bootstrap-datatable">
					  <tbody>
						<tr>
							<td style="text-align:right;width: 20%">公司福利：</td>
							<td  style="text-align:left;width: 30%">
								${pay.subsidy }&nbsp;&nbsp;
								<img alt="" id="hide3"  style="display:none;" src="<%=basePath%>img/youlingimg/delete.png">
								<img alt="" id="show3"  src="<%=basePath%>img/youlingimg/add.png">
							</td>
							<td style="text-align:right;width: 20%">其他补贴：</td>
							<td  style="text-align:left;width: 30%">
								${pay.otherSubsidies }
							</td>
						</tr>
					  </tbody>
				  </table>
				  <table id="latedeductions3" class="table table-striped table-bordered bootstrap-datatable" style="display:none;" >
					  <tbody>
						<tr>
							<td style="text-align:center;width: 30%">名称</td>
							<td style="text-align:center;width: 20%">金额</td>
						</tr>
					  <c:forEach items="${sublist }" var="late">
						<tr>
							<td style="text-align:center; 20%">${late.name }</td>
							<td style="text-align:center;width: 20%">${late.money }</td>
						</tr>
					  </c:forEach>
					  </tbody>
				  </table>  
				  <span>年终奖款项</span>
				  <table id="tab" class="table table-striped table-bordered bootstrap-datatable">
					  <tbody>
						<tr>
							<td style="text-align:right;width: 20%">年终奖：</td>
							<td  style="text-align:left;width: 30%">
								${pay.annualBonus }
							</td>
							<td style="text-align:right;width: 20%">年终奖税：</td>
							<td  style="text-align:left;width: 30%">
								${pay.annualBonusTax }
							</td>
						</tr>
					  </tbody>
				  </table>
				  <span>结算薪资</span>
				  <table id="tab" class="table table-striped table-bordered bootstrap-datatable">
					  <tbody>
						<tr>
							<td style="text-align:right;width: 20%">实发薪资：</td>
							<td colspan="3" style="text-align:left;">
								${pay.payroll }
							</td>
						</tr>
						<tr class="content-search" style="text-align: center;">
							<td colspan="4" style="width:100%;">
								<div>
									<button style="background-color:#f55353;" type="button" onclick="closebutton();" id="output1">关闭</button>
								</div>
							</td>
						</tr>
					  </tbody>
				  </table>          
				</div>	
			</div>
	</form>
</body>
</html>
